<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <link rel="stylesheet" href="../../vendor/bootstrap3/css/bootstrap.min.css">
</head>
<body ng-app="myApp">
<nav class="navbar navbar-default">
    <div class="container">
        <ul class="nav nav-pills pull-right" ng-controller="navController">
            <li role="presentation" class="active"><a href="#/Book/Moby">Moby</a></li>
            <li role="presentation"><a href="#/Book/Moby/ch/1">Moby: Ch1</a></li>
            <li role="presentation"><a href="#/Book/Gatsby">Gatsby</a></li>
            <li role="presentation"><a href="#/Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a></li>
            <li role="presentation"><a href="#/Book/Scarlet">Scarlet Letter</a><br/></li>
        </ul>
    </div>
</nav>
<div class="container" ng-controller="ExampleController">
    <div class="page-header">
        Snippet: <textarea ng-model="snippet" class="form-control" rows="6"></textarea>
    </div>
    <!--
    ngSanitize模块提供了一个linky过滤器：
    linky能找出文本中的链接,然后把它转换成html链接.
    什么意思,就是说,一段文本里有一个链接,但是这个链接没有被a标签嵌套,linky能把它找出来,
    然后给它加上a标签并且给a链接添加正确的href属性,
    还可以设置打开的方式(_blank,_self,等...)。
它查找链接是根据这些关键词来的: http/https/ftp/mailto/,或者就直接是一个email地址。
-->
    <!--
    下表列出了四个过滤器示例
    linky filter：展示文本中查找出链接或者邮箱
    linky target：新标签页打开链接的文本
    linky custom attributes：当前标签页打开链接的文本
    no filter：普通文本，没有过滤
    -->
    <table class="table">
        <thead>
        <tr>
            <th>Filter</th>
            <th>Source</th>
            <th>Rendered</th>
        </tr>
        </thead>
        <tbody>
        <tr id="linky-filter">
            <td>linky filter</td>
            <td>
                <pre>&lt;div ng-bind-html="snippet | linky"&gt;<br>&lt;/div&gt;</pre>
            </td>
            <td>
                <div ng-bind-html="snippet | linky"></div>
            </td>
        </tr>
        <tr id="linky-target">
            <td>linky target</td>
            <td>
                <pre>&lt;div ng-bind-html="snippetWithSingleURL | linky:'_blank'"&gt;<br>&lt;/div&gt;</pre>
            </td>
            <td>
                <div ng-bind-html="snippetWithSingleURL | linky:'_blank'"></div>
            </td>
        </tr>
        <tr id="linky-custom-attributes">
            <td>linky custom attributes</td>
            <td>
                <pre>&lt;div ng-bind-html="snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}"&gt;<br>&lt;/div&gt;</pre>
            </td>
            <td>
                <div ng-bind-html="snippetWithSingleURL | linky:'_self':{rel: 'nofollow'}"></div>
            </td>
        </tr>
        <tr id="escaped-html">
            <td>no filter</td>
            <td>
                <pre>&lt;div ng-bind="snippet"&gt;<br>&lt;/div&gt;</pre>
            </td>
            <td>
                <div ng-bind="snippet"></div>
            </td>
        </tr>
        </tbody>
    </table>
    <div ng-view>
    </div>
</div>
<script type="text/javascript" src="../../vendor/angular/angular.min.js"></script>
<script type="text/javascript" src="../../vendor/angular/angular-route.min.js"></script>
<script type="text/javascript" src="../../vendor/angular/angular-sanitize.min.js"></script>
<script type="text/javascript" src="app/index.js"></script>
</body>
</html>